package com.htfyun.roobofactory;

import com.roobo.hardware.KeyEventManager;

/**
 * Created by sst on 2018/8/1.
 */

public enum TestKeysAttr {

    left(R.string.test_keys_left, KeyEventManager.KEY_KEYCODE_LEFT, 1 << 0, 1 << 0),
    right(R.string.test_keys_right, KeyEventManager.KEY_KEYCODE_RIGHT, 1 << 1, 1 << 1),
    recovery(R.string.test_keys_recovery, KeyEventManager.KEY_KEYCODE_RECOVERY, 1 << 2, 1 << 2),
    vol_add(R.string.test_keys_vol_add, KeyEventManager.KEY_KEYCODE_VOLUME_UP, 1 << 3, 1 << 3),
    vol_sub(R.string.test_keys_vol_sub, KeyEventManager.KEY_KEYCODE_VOLUME_DOWN, 1 << 4, 1 << 4),
    function(R.string.test_keys_function, KeyEventManager.KEY_KEYCODE_FUNCTION, 1 << 6, 1 << 6),
    hall(R.string.test_keys_hall, KeyEventManager.KEY_KEYCODE_HALL, 1 << 7, 1 << 7),;

    private final int nameResId;
    private final int keyCode;
    private final int flagKeyDown;
    private final int flagKeyUp;

    private TestKeysAttr(int nameResId, int keyCode, int flagKeyDown, int flagKeyUp) {
        this.nameResId = nameResId;
        this.keyCode = keyCode;
        this.flagKeyDown = flagKeyDown;
        this.flagKeyUp = flagKeyUp;
    }

    public int getNameResId() {
        return nameResId;
    }

    public int getKeyCode() {
        return keyCode;
    }

    public int getFlagKeyDown() {
        return flagKeyDown;
    }

    public int getFlagKeyUp() {
        return flagKeyUp;
    }

}
